﻿@using System.Data
@{
    Layout = null;
    ViewBag.Title = "TrackingList";
    var List = ViewBag.TrackList as DataTable;
}
@using System.Collections.Generic
@using KingRoad.EPM.Common.Helper
<script type="text/javascript">
    $(document).ready(function () {
        $("#TrakList a[target=_navTab]").each(function () {
            $(this).click(function (event) {
                var $this = $(this);
                var title = $this.attr("title") || $this.text();
                var tabid = $this.attr("rel") || "_blank";
                var fresh = eval($this.attr("fresh") || "true");
                var external = eval($this.attr("external") || "false");
                var url = $this.attr("href");
                DWZ.debug(url);
                if (!url.isFinishedTm()) {
                    alertMsg.error($this.attr("warn") || DWZ.msg("alertSelectMsg"));
                    return false;
                }
                navTab.openTab(tabid, url, { title: title, fresh: fresh, external: external });
                event.preventDefault();
            });
        });
    });
</script>
<table class="tables tables-bordered tables-hover" id="TrakList">
    <thead>
        <tr>
            <th style="width: 5%; text-align: center">
                标段
            </th>
            <th style="width: 20%; text-align: center">
                计量期
            </th>
            <th style="width: 10%; text-align: center">
                当前流程
            </th>
            <th style="width: 15%; text-align: center">
                操作
            </th>
        </tr>
    </thead>
    <tbody>
        @{
            if (List != null)
            {
                for (int i = 0; i < List.Rows.Count; i++)
                {
                    //if (List.Rows[i]["OperatorInsId"].ToString() != "")
                    //{
            <tr class=" " rel="1">
                <td style="text-align: center">@List.Rows[i]["SegmentCode"]
                </td>
                <td style="text-align: center">@List.Rows[i]["Measure"]
                </td>
                <td style="text-align: center">@List.Rows[i]["TaskInsCaption"]
                </td>
                <td style="text-align: center">
                    <a href="@List.Rows[i]["URL"]" target="_navTab" rel="workFlow.WorkReplay" style="color:Blue">
                        查看详情</a>&nbsp;
                        <a href="@List.Rows[i]["MapURL"]" target="_navTab" rel="workFlow.MapReplay" style="color:Red">
                        查看流程图</a>
                </td>
            </tr> //}
                }
            }
        }
    </tbody>
</table>
